Retypeset the entire diagram using a hacked halign: its template typesets each entry as
(
@@typeset#1@MATRIX TYPESET@
@
@@@
@@@@=@ @=@
@@@=@
@=@
@ @=@
==@
@##!@&&@@##!@#1@@@@
@@@@=
)
Here are the template execution macros: We reset the |@| for each entry, || it the usual way except first all -commands are `redirected' to the queue, and then typeset them. We pass the min/max of the picture from one entry to the next using a global macro |@minmax|.
( @@@ne @=@ @@
@@minmax=
Again some parsing determines whether this is a |*|-object or a normal object:
( @@@@ne @##1,##2@@ENTRY "##1,##2"@=##1 @=##2 @minmax @##1,##2@@ @ @@@i
@@@i@ =@@norm @*@*##1##@@star##1 @
@@@star#1#2#3!@@@ix@#1#2@@@9@h@ @@=@ @=@ @ #3 @=@x
@@@norm#1!@@##1@@ix@ @##1@ @#1@@@9 @=@@ @@=@ @=@ @ #1 @=@x )
Dropping the entry is just retypesetting it at the right location again ignoring the -stuff:
( @@#1#2@#1@ @@=@ @=@ #2 )
The macros used for queuing are these; only the toks9 replacement is tricky; furthermore queueing is "not" done if we are saving because the effect will give the same result without risk of extremely long lines in the compiled file!
( @@@ @=@ @@ix@=@@toksix@ @=@ @@ix@=@@toksix@ @=@
@@#1#2@#2
@@@toksix@ @@toksix@i 9=
@@@toksix@i@##1@@9=##1@ 9
@@@ne @ )